package com.ruoyi.system.service.impl;

import java.util.Collections;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MenuGoodsMapper;
import com.ruoyi.system.domain.MenuGoods;
import com.ruoyi.system.service.IMenuGoodsService;

/**
 * 商家关联菜单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-17
 */
@Service
public class MenuGoodsServiceImpl implements IMenuGoodsService 
{
    @Autowired
    private MenuGoodsMapper menuGoodsMapper;

    /**
     * 查询商家关联菜单
     * 
     * @param menuId 商家关联菜单主键
     * @return 商家关联菜单
     */
    @Override
    public MenuGoods selectMenuGoodsByMenuId(Long menuId)
    {
        return menuGoodsMapper.selectMenuGoodsByMenuId(menuId);
    }

    /**
     * 查询商家关联菜单列表
     * 
     * @param menuGoods 商家关联菜单
     * @return 商家关联菜单
     */
    @Override
    public List<MenuGoods> selectMenuGoodsList(MenuGoods menuGoods)
    {
        return menuGoodsMapper.selectMenuGoodsList(menuGoods);
    }

    /**
     * 新增商家关联菜单
     * 
     * @param menuGoods 商家关联菜单
     * @return 结果
     */
    @Override
    public int insertMenuGoods(MenuGoods menuGoods)
    {
        return menuGoodsMapper.insertMenuGoods(menuGoods);
    }

    /**
     * 修改商家关联菜单
     * 
     * @param menuGoods 商家关联菜单
     * @return 结果
     */
    @Override
    public int updateMenuGoods(MenuGoods menuGoods)
    {
        return menuGoodsMapper.updateMenuGoods(menuGoods);
    }

    /**
     * 批量删除商家关联菜单
     * 
     * @param menuIds 需要删除的商家关联菜单主键
     * @return 结果
     */
    @Override
    public int deleteMenuGoodsByMenuIds(Long[] menuIds)
    {
        return menuGoodsMapper.deleteMenuGoodsByMenuIds(menuIds);
    }

    /**
     * 删除商家关联菜单信息
     * 
     * @param menuId 商家关联菜单主键
     * @return 结果
     */
    @Override
    public int deleteMenuGoodsByMenuId(Long menuId)
    {
        return menuGoodsMapper.deleteMenuGoodsByMenuId(menuId);
    }

    @Override
    public int addMenuGoodsList(List<MenuGoods> menuGoods) {

        return menuGoodsMapper.addMenuGoodsList(menuGoods);
    }

    @Override
    public int deleteMenuGoods(MenuGoods menuGoods) {
        return menuGoodsMapper.deleteMenuGoods(menuGoods);
    }


}
